<html>
<head><meta charset="utf-8"><title>Saturating `Duration` methods · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html">Saturating `Duration` methods</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208496599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/208496599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#208496599">(Aug 30 2020 at 17:53)</a>:</h4>
<p>Hello everyone!<br>
I have opened a PR to add saturating methods to <code>Duration</code>: <a href="https://github.com/rust-lang/rust/pull/76114">https://github.com/rust-lang/rust/pull/76114</a><br>
If anyone has some feedback that would be greatly appreciated <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="209097912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209097912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209097912">(Sep 04 2020 at 14:11)</a>:</h4>
<p>This overall looks fine to me, and I think I could probably r+ it since it will be unstable. Any t-libs member want to double check that it wouldn't introduce something insta-stable?</p>



<a name="209137254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209137254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209137254">(Sep 04 2020 at 20:24)</a>:</h4>
<p>Looks like it's just functions and constants, so should be fine?  I thought it was only trait impls that could backdoor stabilize things (either the impl itself, or by allowing access to unstable types like NoneError via Try).</p>



<a name="209235471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209235471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209235471">(Sep 06 2020 at 18:13)</a>:</h4>
<p>I've created a tracking issue <a href="https://github.com/rust-lang/rust/issues/76416">https://github.com/rust-lang/rust/issues/76416</a> and updated the code. It should be ready for another pass of review <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="209714175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209714175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209714175">(Sep 10 2020 at 21:51)</a>:</h4>
<p>Hello! Its me again :P Could anyone take a look at those 3 nice new methods I want to add to <code>Duration</code>? That would be super nice!</p>



<a name="209801146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209801146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209801146">(Sep 11 2020 at 16:10)</a>:</h4>
<p><span class="user-mention" data-user-id="281572">@marmeladema</span> Please wait for <span class="user-mention" data-user-id="116155">@Jake Goulding</span> to review it again, maybe he/she is busy.</p>



<a name="209890105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209890105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209890105">(Sep 12 2020 at 16:59)</a>:</h4>
<p>Thank you both for reviewing <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span> I just saw its been merged <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="209913047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Saturating%20%60Duration%60%20methods/near/209913047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Saturating.20.60Duration.60.20methods.html#209913047">(Sep 13 2020 at 04:22)</a>:</h4>
<p><span class="user-mention" data-user-id="281572">@marmeladema</span> Thanks for sending the patch. :D</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>